package com.openarena.model;

import java.util.ArrayList;
import java.util.List;

public class FlagCapture {

    private String team;
    private List<Player> players;
    private Integer gameTime;

    public FlagCapture() {
        players = new ArrayList<Player>();
    }

    public Integer getGameTime() {
        return gameTime;
    }

    public void setGameTime(Integer gameTime) {
        this.gameTime = gameTime;
    }

    public List<Player> getPlayers() {
        return players;
    }

    public String getTeam() {
        return team;
    }

    public void setTeam(String team) {
        this.team = team;
    }

    public String getFormattedGameTime() {
        int minutes = getGameTime() / 60;
        int seconds = getGameTime() % 60;
        String formattedTime = minutes + ":" + ((seconds >= 10) ? seconds : "0" + seconds);

        return formattedTime;
    }
}
